package com.smm.web.vmc.controller.admin;

import com.smm.web.vmc.service.AdminService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by zhenghao on 2016/9/6.
 *
 */
@Controller
public class AdminLogOutController {

    @RequestMapping("/adminLogout.do")
    public ModelAndView logout(HttpServletRequest request){

        //清除session
        request.getSession().removeAttribute(AdminService._ADMIN_IN_SESSION);

        return new ModelAndView("admin/login");
    }

}
